<!-- 列表显示头 开始 -->
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="STYLE1" bgcolor="b5d6e6">
  <tr>
    <td colspan="3" align="left" background='<%=$urr+"skin/images/bg.gif"%>'><img src='<%=$urr+"skin/icon/list.gif"%>' width="16" height="16" />
      <span class="STYLE3"><%=@titles %></span></td>
  </tr>
</table>
<!-- 列表显示头 结束 -->



<!-- 列表数据项 开始 -->
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6"  class="STYLE1">
  <tr>
    <td width="10%" height="22" align="center" bgcolor="#33FFFF">广告名称</td>
    <td width="5%" align="center" bgcolor="#33FFFF">位置</td>
    <td width="5%" align="center" bgcolor="#33FFFF">日期</td>
    <td width="5%" align="center" bgcolor="#33FFFF">点击次数</td>   
  </tr>
  <% @ads.each_with_index do |ad,index| %>
    <%
    bg_col = "#CCFFCC"
    unless index%2 == 0
      bg_col = "#FFCCCC"
    end
  %>
    <tr>
      <td align="center" bgcolor=<%= bg_col %>>
        <%=h ad.ad_name %>
      </td>
      <td align="center" bgcolor=<%= bg_col %>>
        <% ad_a = get_ad(ad.ad_id) %>
        <%unless ad_a.nil?%>
          <% if ad_a.orders == 1 %>
            <%="首页广告" %>
          <% elsif ad_a.orders == 2 %>
            <%="栏目广告" %>
          <% elsif ad_a.orders == 3 %>
            <%="资源广告" %>
          <%else%>
            <%="固定广告" %>
          <% end %>
        <%else%>
          <%="已删除广告" %>
        <%end%>
      </td>
      <td align="center" bgcolor=<%= bg_col %>>
        <%=h ad.created_date %>
      </td>
      <td align="center" bgcolor=<%= bg_col %>>
        <%=h ad.ct %>
      </td>
    </tr>
  <% end %>
</table>
<!-- 列表数据项 结束 -->
